package embuzzled.g5;

import java.awt.Color;
import java.util.ArrayList;

/**
 *  A composite puzzle where each component is a letter.
 *
 */
public class CompositeWordPuzzle extends CompositePuzzle 
{
	String word;
	
	public CompositeWordPuzzle(String word)
	{
		super();
		
		this.word = word;
		ArrayList<boolean[][]> letters =  Letters.getString3x3(word);		
		
		for(boolean[][] map : letters)
		{
			PuzzleComponent p = new PuzzleComponent(map.length, map[0].length);
			p.setColorMap(map);
			p.setColor(Color.WHITE); //TODO - replace with actual coloring scheme
			
			//Add letter to this puzzle
			add(p);
			
		}
	}
}
